<?php
$langs = array();

if ($handle = opendir("lang/")) {
	while (false !== ($file = readdir($handle))) {
		if (strpos($file, '.') === false) {
			if (is_dir($setupPath."lang/".$file)) {
				$langs[] = $file;
			}
		}
	}
	closedir($handle);
}
sort($langs);
?>
<form name="install" action="index.php?action=welcome" method="post">
	<table width="100%">
	<tr>
	<td valign="top">
		<div class="chlangnote">Please choose your language and click on "Next" botton.</div><br />
		<center><img src="<?php echo include_image('img_splash.gif')?>" alt="Revolutionizing The Cms World" /></center>
	</td>
	<td align="center" width="256">
		<img src="<?php echo include_image('img_box.png')?>" alt="MODx Create and Do More with Less" />&nbsp;
	</td>
	</tr>
	</table>
	<div id="navbar">
	<h1 style="float:left;">Choose language:&nbsp;&nbsp;</h1>
	<select name="language" style="float:left;">
	<?php foreach ($langs as $language) echo '<option>' . $language . '</option>' ?>
	</select>
	<br /><br /><hr style="border:solid 1px #666666" />
	<input type="submit" value="Next" style="float:right;width:100px;" />
	</form>
	</div>
</form>